home *** CD-ROM | disk | FTP | other *** search
- Path: keats.ugrad.cs.ubc.ca!not-for-mail
- From: c2a192@ugrad.cs.ubc.ca (Kazimir Kylheku)
- Newsgroups: comp.lang.c,comp.unix.programmer
- Subject: Re: Bus error
- Followup-To: comp.unix.programmer
- Date: 6 Mar 1996 21:14:23 -0800
- Organization: Computer Science, University of B.C., Vancouver, B.C., Canada
- Message-ID: <4hlrbfINN81e@keats.ugrad.cs.ubc.ca>
- References: <DnuvJG.CA5@cdf.toronto.edu>
- NNTP-Posting-Host: keats.ugrad.cs.ubc.ca
-
- In article <DnuvJG.CA5@cdf.toronto.edu>,
- Lo Adley <a488load@cdf.toronto.edu> wrote:
- >Hi, there,
- >
- > Could you tell me what 'bus error' means?
-
- A bus error means that the SIGBUS signal was raised in your program. On a
- UNIX system, this can be be caused by (but not limited to) any of following:
-
- - misaligned access to a word (usually caused by interpreting a
- pointer to an object with relaxed alignment as a pointer to
- an object with stricter alignment). E.g. casting a char * to an
- int *, and then trying to read or write through that pointer.
-
- - calling raise(SIGBUS); to ``artificially'' raise the signal.
-
- - calling kill(<pid>, SIGBUS); from the current process or another
- process, where <pid> is the process ID of your process to
- artifically raise the signal.
-
- (I have seen an instance where a malicious user wrote a shell
- script into another user's account while that other user was away
- from this terminal. The script would pick randomly at the user's
- processes that were running his programming project and send them
- SIGSEGV signals, leading him to believe he had a bug).
-
- - accessing certain kinds of virtual memory pages can cause a SIGBUS.
- For example, accessing a part of a memory mapped region which extends
- past the end of the actual file object being mapped results in a
- SIGBUS.
-
- [ redirected to---guess where?---comp.unix.programmer ]
-
-
- redirected to comp.unix.programmer
- --
-
-